package io2;

import java.io.*;

public class OISDemo {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        FileInputStream fis = new FileInputStream("student1.obj");
        ObjectInputStream ois = new ObjectInputStream(fis);
        Object obj = ois.readObject();
        Student az = (Student) obj;
        System.out.println(az);
        ois.close();








//        FileInputStream fis = new FileInputStream("student.obj");
//        ObjectInputStream ois = new ObjectInputStream(fis);
//        Object obj = ois.readObject();
//        Student nnm = (Student) obj;
//        System.out.println(nnm);
//        ois.close();
    }
}
